//
//  LGZuPyuItemView.m
//  ligenyun
//
//  Created by Mac on 2018/4/9.
//  Copyright © 2018年 stoneobs@icloud.com. All rights reserved.
//

#import "LGZuPyuItemView.h"
@interface LGZuPyuItemView()
@property(nonatomic, strong) UIImageView                     *bannerImageView;
@property(nonatomic, strong) STLabel                     *titleLable;
@property(nonatomic, strong) STLabel                     *nameLable;
@property(nonatomic, strong) STLabel                     *lookLable;
@property(nonatomic, strong) STLabel                     *timeLable;
@end
@implementation LGZuPyuItemView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self configSubView];
    }
    return self;
}

#pragma mark --subView
- (void)configSubView{
    self.backgroundColor = [UIColor whiteColor];
    self.bannerImageView = [[UIImageView alloc] initWithFrame:CGRectMake(15, 0, 60, 80)];
    self.bannerImageView.image = [UIImage imageNamed:@"族谱01"];
    [self addSubview:self.bannerImageView];
    
    CGFloat lableWith = self.width - self.bannerImageView.right - 10;
    self.titleLable = [[STLabel alloc] initWithFrame:CGRectMake(self.bannerImageView.right + 5, 5, lableWith, 20)
                                                     text:@"X氏族谱"
                                                textColor:FirstTextColor
                                                     font:14
                                              isSizetoFit:NO
                                            textAlignment:NSTextAlignmentLeft];
    [self addSubview:self.titleLable];
    
    self.nameLable = [[STLabel alloc] initWithFrame:CGRectMake(self.bannerImageView.right + 5, self.titleLable.bottom, lableWith, 20)
                                               text:@"联系人:石师傅"
                                           textColor:FirstTextColor
                                                font:12
                                         isSizetoFit:NO
                                       textAlignment:NSTextAlignmentLeft];
     [self addSubview:self.nameLable];
    self.lookLable = [[STLabel alloc] initWithFrame:CGRectMake(self.bannerImageView.right + 5, self.nameLable.bottom, lableWith, 20)
                                               text:@"查看次数：123此"
                                          textColor:FirstTextColor
                                               font:12
                                        isSizetoFit:NO
                                      textAlignment:NSTextAlignmentLeft];
    [self addSubview:self.lookLable];
    
    self.timeLable = [[STLabel alloc] initWithFrame:CGRectMake(self.bannerImageView.right + 5, self.lookLable.bottom, lableWith, 20)
                                               text:@"剑谱日期：11/10"
                                          textColor:FirstTextColor
                                               font:12
                                        isSizetoFit:NO
                                      textAlignment:NSTextAlignmentLeft];
    [self addSubview:self.timeLable];
}
@end
